package com.example.mapper;

import com.example.pojo.Student;
import com.example.pojo.StudentQueryParam;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * StudnetMapper 类的描述信息
 *
 * @author 12427
 * @since 2025/6/7 13:11
 */
@Mapper
public interface StudnetMapper {

    /**
     * 条件查询学生
     */
    List<Student> list(StudentQueryParam studentQueryParam);

    /**
     * 删除学院  批量删除
     */
    void deleteById(List<Integer> ids);

    /**
     * 插入学员
     */
//@Insert("insert into student (name, no, gender, phone, id_card, is_college, address, degree, graduation_date, clazz_id, violation_count, violation_score, create_time, update_time) values (#{name},)")
    void inst(Student student);

    Student getINfo(Integer id);

    void update(Student student);

    void updatesore(Integer id, Integer score);

    @MapKey("name")
    List<Map<String, Object>> studentDegreeData();

    @MapKey("name")
    List<Map<String, Object>> countStudentCountData();
}
